<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>3-新浪导航</title>
    <style>
        *{
            margin:0;
            padding:0;
            font-family: 'Micorsoft yahei';
        }
        header{
            border-top: 3px solid #ff8500;
            border-bottom: 1px solid #eeeef0;
            height: 42px;
            /* line-height: 42px; */
        }
        nav{
            width: 1200px;
            margin:0 auto;
        }
        nav a{
            text-decoration: none;
            font-size: 12px;
            color: #4c4c4c;
            /* 上下是0 左右15 */
            padding: 13px 15px;
            /* display: inline-block; */
            /* 都向左浮动,去除间隙，让a有适应内边距的高 */
            float: left;
        }
        nav a:hover{
            background: #edeef0;
            color: #ff8400;
        }
        nav a.cur{
            background: #edeef0;
            color: #ff8400;
        }
    </style>
</head>
<body>
    <header>
        <nav>
            <a href="" class="cur">设为首页</a>
            <a href="">联系我们</a>
            <a href="">投诉</a>
            <a href="">移动新浪</a>
            <a href="">移动客户端</a>
        </nav>
    </header>
</body>
</html>